// lib/services/database/database_manager.dart
import 'package:stock_helper/data/datasource/local/database.dart';

class DatabaseManager {
  static AppDatabase? _database;

  static AppDatabase get instance {
    if (_database == null) {
      _database = AppDatabase();
    }
    return _database!;
  }

  static Future<void> close() async {
    if (_database != null) {
      await _database!.close();
      _database = null;
    }
  }
}